﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace SHomeWorkshop.LunarPresentation.Converts
{
    [ValueConversion(typeof(string), typeof(string))]
    public class ExpanderBtnTextConverter : IValueConverter
    {
        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string str = value as string;
            if (str == null || str.Length <= 0) return "※";
            else return str;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value;
        }

        #endregion
    }
}
